[libcxx] Add support for linking libc++ against a static ABI library. Summary: This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Subscribers: compnerd, cfe-commits Differential Revision: http://reviews.llvm.org/D8017 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231076 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d27066..230a3c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt 
@@ -61,6 +61,7 @@  This option may only be used when LIBCXX_ENABLE_THREADS=OFF." ON)  option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." ON)  option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON) +option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI library" OFF)  set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.")  set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC toolchain.")  if (LIBCXX_BUILT_STANDALONE) @@ -68,6 +69,14 @@  "Define the sanitizer used to build the library and tests")  endif()   +if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) + if (APPLE) + message(FATAL_ERROR "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is not supported on OS X") + else() + message(WARNING "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option") + endif() +endif() +  set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)  if (NOT LIBCXX_CXX_ABI)  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND